using System;
class DateProperties
{

	public static void Main()
	{
		Date date=new Date();
//		Console.WriteLine(date);
		try
		{
			date.Day=10;
			date.Year=1800;
			date++;
			Console.WriteLine(date);
			if(date.GetType()==typeof(Date))
				Console.WriteLine("is a date type!");
		}
		catch (Exception exc)
		{
			Console.WriteLine(exc);
		}
		Console.WriteLine("zhubcien");
	}

}
class Date
{
		private int year;
		private int month;
	    private	int day;
	static int[] monthdays=new int[]{0,31,59,90,120,151,
										181,212,243,273,304,334};
	public Date()
	{
		year=0;
		month=0;
		day=0;		
	}
	public static  Date operator++(Date d)
	{
		d.day++;
		return d;
	}
	public static Date operator + (Date d1,Date d2)
	{
		return new Date();
	}
	public override string ToString()
	{
		return "year"+year+"month"+month+"day"+day;
	}
	public int Year
	{
		set 
		{
			if(value<1600)
			{
				throw new ArgumentOutOfRangeException("year");
			}
			else
				year=value;
		}
		get
		{
			return year;
		}
	}
	public int Month
	{
		set
		{
			if(value<1||value>12)			
				throw new ArgumentOutOfRangeException("month");			
			else
				month=value;
		}
		get
		{
			return month;
		}
	}
	public int Day
	{
		set 
		{
			if(value<1||value>31)
			{
				throw new System.ArgumentOutOfRangeException("day");				
			}
			else
			{
				day=value;
				Console.WriteLine("day else");
			}
		}
		get
		{
			return day;
		}
	}
	public int DayOfYear
	{
		get
		{
			return 1;
		}
	}
	public static bool IsLeapYear(int year)
	{
		return true;
	}


}



